<init-param> <name>javax.portlet.faces.bridgeEventHandler</name> <value>org.jboss.example.booking.BookingEventHandler</value> </init-param>
For a portlet to receive an event, it needs to specify the following within portlet.xml within its' <portlet> section:
<init-param> <name>javax.portlet.faces.bridgeEventHandler</name> <value>org.jboss.example.booking.BookingEventHandler</value> </init-param>
The portlet also needs to specify that it is able to receive an event from the portal by adding the below to portlet.xml within its' <portlet> section:
<supported-processing-event> <qname xmlns:jbp="urn:jboss:portal:samples:event">jbp:BookingEvent</qname> </supported-processing-event>
As when defining the portlet that can publish an event, the portlet that can receive that event needs to define the link between the qname and event type. The identical <event-definition> specified in Send Event can be used.
To process the Event within a portlet a handler, that was defined within portlet.xml as seen earlier, needs to be created with content similar to the following:
public class BookingEventHandler implements BridgeEventHandler { public EventNavigationResult handleEvent(FacesContext context, Event event) { // Process event payload as appropriate } }